<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8"/>
  <link rel="shortcut icon" href="./vite.svg" type="image/svg+xml"/>
  <link rel="stylesheet" href="./vender/jquery/zTreeStyle/zTreeStyle.css" type="text/css">
  <script src = "./vender/jquery/jquery.js"></script>
  <script src = "./vender/date97/WdatePicker.js"></script>
  <script src = "./vender/jquery/jquery.ztree.core.min.js"></script>
  <script src = "./vender/jquery/jquery.ztree.exedit.min.js"></script>
  <script src = "./vender/jquery/jquery.ztree.exhide.min.js"></script>
  <script src = "./vender/codemirror.js"></script>
  <script src = "./vender/fabric.js"></script>
  <!-- 局域网环境, 请下载 editor.js替换以下路径 -->
  <!--        <script src="http://194.168.4.87:9001/editor.js"></script>-->
  <script src="./editor.js"></script>
  <script>
    $(function() {
      //配置项可以不设置，会使用默认设置
      let option = {
        license:'oKGcyRGDqL+6oqiS1Wl/gjz8uNGQ56ltVWoC/YdXA9ygjEXCly53QUYutlnqYXr9aA8PHIyqS2nbSUVqNCEK78iGveFDgyBvhSREJqt0j30pEatL0MuDwgNliOYWUTkU4bJUii1b0/w7G57nU7dDYFFBahKSgAuuO7tLV/uT8Uo=',
        mode:'form',  //默认模式 form:表单模式，design:设计模式
        pdfUrl:'http://127.0.0.1:2023/pdf/post',  //pdf生成服务
        directPrinturl: 'http://127.0.0.1:2023/print/',
        // directPrintUrl: 'http://192.168.31.104:29294/api/medinnurse/nursercd/print/',
        dictionary: [  //知识库
          {name: '体征', isParent:true, treeUrl:'https://www.x-emr.cn/dict?category=20', itemUrl:'https://www.x-emr.cn/dictitem'},
          {name: '症状', isParent:true, treeUrl:'https://www.x-emr.cn/dict?category=20', itemUrl:'https://www.x-emr.cn/dictitem'},
          {name: '卫生信息数据元', isParent:true, treeUrl:'https://www.x-emr.cn/dict?category=40', itemUrl:'https://www.x-emr.cn/dictitem'},
          {name: '电子病历数据集', isParent:true, treeUrl:'https://www.x-emr.cn/dict?category=50', itemUrl:'https://www.x-emr.cn/dictitem'},
          {name: '国家医保标准', isParent:true, treeUrl:'https://www.x-emr.cn/dict?category=80', itemUrl:'https://www.x-emr.cn/dictitem'},
          {name: '省数据平台标准', isParent:true, treeUrl:'https://www.x-emr.cn/dict?category=90', itemUrl:'https://www.x-emr.cn/dictitem'},
        ]
      }

      //从模块的Editor组件中获取mode，doc，lang属性 (该段代码可删除)
      let mode = window.frameElement.getAttribute('mode')
      let doc = window.frameElement.getAttribute('doc')
      let lang = window.frameElement.getAttribute('lang')
      mode? option.mode = mode: null
      lang? option.lang = lang: null

      //初始化编辑器（初始化代码可以放入组件的load事件中）
      editor.init(option).then(()=>{
        doc? editor.loadUrl(doc) : null
      })

    })
  </script>
</head>
<body></body>
</html>
